import request from '@/utils/request';

// 发送验证码

export const getSuggestionApi = (q: string) => {
  return request({
    url: '/v1_0/suggestion',
    params: {
      q,
    },
  });
};
// 搜索的详情信息api
type SearchActionType = { page?: number; per_page?: number; q: string };

export const getSearchActionApi = ({
  page = 1,
  per_page = 10,
  q: keyword,
}: SearchActionType) => {
  return request({
    url: '/v1_0/search',
    params: {
      page,
      per_page,
      q: keyword,
    },
  });
};
